package com.service.khqy;

import java.util.Vector;

import com.bpms.common.CommonUtil;
import com.bpms.common.JdbcWorker;
import com.bpms.common.VO;
import com.bpms.common.VOL;
import com.bpms.common.VOList;
import com.bpms.esb.IService;

public class Getaccountnobyid implements IService {

	public VO exec(VO arg0) {
		JdbcWorker j=null;
		VO vo=new VO();
		try{
			VOL vol=new VOL();
			j=new JdbcWorker();
			
			String accountid=arg0.getAttr("accoutid");
			System.out.println("accountid..."+accountid);
			StringBuilder sql=new StringBuilder("select ACCOUNT,FULLNAME,BANK,AVAILABLE from ACCOUNTNO where ACCOUNTID='").append(accountid).append("' and available!='2'");
			
			VOList volist=j.readAll(new VO(), sql.toString());
			vol=new VOL(volist);
			vo.setObj("vol",vol);
			
			vo.setAttr("result", "1");
			vo.setAttr("msg", "得到簽約帐号成功");
		}catch (Exception e){
			CommonUtil.debug("Getcontract exception",e);
			vo.setAttr("result", "9999");
			vo.setAttr("msg", "获得签约错误");
		}
		return vo;
	}

}
